﻿using System.ComponentModel;
using System.Drawing.Design;
using System.Windows.Forms;

namespace Marmat.Forms
{
    [ToolboxItem(true)]
    public partial class RichEditControl : DevExpress.XtraRichEdit.RichEditControl, IControl
    {
        public RichEditControl()
        {

            // 此调用是设计器所必需的。
            this.InitializeComponent();

            // 在 InitializeComponent() 调用之后添加任何初始化。
        }

        /// <summary>
    /// 返回或设置控件的绑定Table字段
    /// </summary>
    /// <returns></returns>
        [Localizable(true)]
        [EditorBrowsable(EditorBrowsableState.Always)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [Description("返回或设置控件的绑定Table字段")]
        public BindingField BindingField
        {
            get
            {
                if (this._Binding is null)
                {
                    this._Binding = new BindingField(this, "RtfText", null, null, true, DataSourceUpdateMode.OnValidation);
                }

                return this._Binding;
            }
        }

        private BindingField _Binding = null;
    }
}